A software instruction which implements a multiplication function in a data processing system augments both the versatility of the system and the applications in which the system may be used. Typical multiplication functions include both a simple multiply function which multiplies two multiplicands together to form a product and a multiply/accumulate function which executes a multiply function and adds the resulting product to the contents of a predetermined register. In both cases, the multiplication functions are generally implemented in a single software instruction. For example, the multiply function may be executed with an instruction labelled "MPY" and the multiply/accumulate function may be implemented by an instruction labelled "MAC."
Multiplication functions associated with software instructions such as MPY and MAC are generally implemented using one of two primary techniques. Typically, the data processing system is designated as providing either a fractional or an integer multiplication operation. As the name implies, the fractional multiplication operation usually involves multiplicands which are fractions. In a data processing system which implements the fractional multiplication operation, the product of the multiplication operation is stored to the right of a decimal point which is always located in a fixed position. The integer multiplication operation involves multiplicands which are integers. In the integer multiplication operation, the multiplicands are integer values which are stored in a plurality of bit positions to the left of the fixed decimal point. The product formed by an integer multiplication operation typically requires more bit positions to the left of the decimal point.
Typically, the application of the data processing system determines whether an architectural design of the system will implement either the fractional or the integer multiplication functions. For example, the fractional multiplication function is generally implemented on data processing systems which provide digital signal processing capabilities. Assume that a user of a data processing system which implemented an architecture which supports only the fractional multiplication function needs the result of an integer multiplication function. To obtain the result of the integer multiplication function, the user must typically write a software program using a fractional multiplication instruction and subsequently manipulate the fractional multiplication product to form the integer multiplication result.
The software program written by the user of the fractional data processing system results in increased instruction cycle time. However, the increased cycle time is often necessary if the response to the integer multiplication function must be provided. In many data processing system designs, both the time necessary to implement an instruction and the validity of the result of the instruction are of primary concern. However, in data processing system designs which implement fractional multiplication functions, the execution time of an instruction must be increased to provide a valid result in integer form.